
package gdrObject;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

import concept.Effect;

public abstract class Equippment extends GdrObject{
    public Equippment(String name, String iconPath, int requiredIntelligence, int requiredStrength, int requiredAgility, int requiredDetermination){
        super(name, iconPath);
        this.requiredAgility = requiredAgility;
        this.requiredDetermination = requiredDetermination;
        this.requiredIntelligence = requiredIntelligence;
        this.requiredStrength = requiredStrength;
        this.effects = new ArrayList<Effect>();
    }

    public Equippment(String name, String iconPath, int requiredIntelligence, int requiredStrength, int requiredAgility, int requiredDetermination, Collection<Effect> effects){
        super(name, iconPath);
        this.requiredAgility = requiredAgility;
        this.requiredDetermination = requiredDetermination;
        this.requiredIntelligence = requiredIntelligence;
        this.requiredStrength = requiredStrength;
        this.effects = new ArrayList<Effect>();
        for(Effect e : effects)
            this.effects.add(e);
    }

    public int getRequiredStrength() {
        return requiredStrength;
    }

    public int getRequiredAgility() {
        return requiredAgility;
    }

    public int getRequiredIntelligence() {
        return requiredIntelligence;
    }

    public int getRequiredDetermination() {
        return requiredDetermination;
    }
    
    public Iterator<Effect> getEffectsIterator(){
        return effects.iterator();
    }

    public Collection<Effect> getEffects(){
        return effects;
    }
    
    public void addEffect(Effect effect){
        effects.add(effect);
    }

    private int requiredStrength, requiredAgility, requiredIntelligence, requiredDetermination;
    private ArrayList<Effect> effects;
}
